//
//  GYBanner.m
//  GoodLuck
//
//  Created by apple on 2018/5/2.
//  Copyright © 2018年 yunjiazhineng. All rights reserved.
//

#import "GYBanner.h"

@implementation GYBanner

+ (NSArray *)jsonDataWith:(NSArray *)source {
    NSMutableArray *model = [NSMutableArray array];
    
    for (NSDictionary *dic in source) {
        GYBanner *banner = [[GYBanner alloc] initWithDic:dic];
        [model addObject:banner];
    }
    
    return model;
}

- (instancetype)initWithDic:(NSDictionary *)dic {
    self = [super init];
    if (self) {
        
        [self setValuesForKeysWithDictionary:dic];
    }
    return self;
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    //NSLog(@"key =====%@",key);
}

- (NSString *)description {
    NSArray *keys = @[@"image",@"type",@"data"];
    
    return [NSString stringWithFormat:@"%@",[self dictionaryWithValuesForKeys:keys]];
}

@end
